package com.engineering.elink.recruitdao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.engineering.elink.co.recruit.CvdDataSearchCo;
import com.engineering.elink.co.recruit.CvdSearchCo;
import com.engineering.elink.domain.recruit.CvDatabase;
import com.engineering.elink.vo.recruit.CvDataBaseVo;
import com.engineering.elink.vo.recruit.VitaCollectionVo;
import com.engineering.elink.vo.recruit.VitaDeliveryVo;

public interface CvDatabaseMapper {
    int deleteByPrimaryKey(String cvdId);

    int insert(CvDatabase record);

    int insertSelective(CvDatabase record);

    CvDatabase selectByPrimaryKey(String cvdId);

    int updateByPrimaryKeySelective(CvDatabase record);

    int updateByPrimaryKeyWithBLOBs(CvDatabase record);

    int updateByPrimaryKey(CvDatabase record);

    CvDataBaseVo selectInfo(@Param("userId") String userId,@Param("cvdId")String cvdId);
    
    @Select(" select count(1) from cv_database where user_id=#{userId} ")
    int countCvdataByUserId(String userId);
    
    @Select(" select count(1) from cv_database where cvd_id=#{cvdId} ")
    int countCvdataByCvdId(String cvdId);

    CvDatabase selectByUserId(String userId);
    
    List<VitaDeliveryVo> selectCvdDeliveryList(@Param("co") CvdSearchCo co,@Param("userId")String userId);
    
    int countCvdDelivery(@Param("co") CvdSearchCo co,@Param("userId")String userId);

    List<VitaCollectionVo> selectCvdCollectionList(@Param("co") CvdSearchCo co,@Param("userId")String userId);

    int countCvdCollection(@Param("co") CvdSearchCo co,@Param("userId")String userId);

    List<VitaDeliveryVo> selectSearchCvdList(@Param("co") CvdDataSearchCo co,@Param("userId")String userId);
    
    int countSearchCvdList(@Param("co") CvdDataSearchCo co);
    
}